/**
 * Created with CLion.
 * Description: 默认函数
 * User: loong
 * Date: 2020-09-06
 * Time: 22:34
 */
#include <iostream>

using namespace std;

class Y
{
private:
    Y() = default;      //改变访问级别

public:
    Y(Y &) = default;   //以非const引用作为参数
    
    Y &operator=(const Y &) = default;  //作为文档形式，声明为默认函数

protected:
    virtual  ~Y() = default;    // 改变范围级别，以及添加虚函数标签
};

struct aggregate{
    aggregate() = default;
    aggregate(aggregate const &) = default;
    int a;
    double b;
};

int main()
{
    aggregate x = {42,3.141};
    
    return 0;
}